from django.conf.urls.static import static
from django.urls import path, include, re_path
from apis.system.views import LoginView, LogoutView, InitDictionaryViewSet
from settings.conf_base import STATIC_URL, STATIC_ROOT

urlpatterns = [
    re_path(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),

    path('api/login/', LoginView.as_view(), name='token_obtain_pair'),
    path('api/logout/', LogoutView.as_view(), name='token_obtain_pair'),
    # path('token/refresh/', TokenRefreshView.as_view(), name="token_refresh"),
    path('api/init/dictionary/', InitDictionaryViewSet.as_view()),

    path('api/system/', include('apis.system.urls')),
    path('api/base/', include('apis.base_data.urls')),
]


urlpatterns += static(STATIC_URL, document_root=STATIC_ROOT)
